package com.yanqu.road.entity.log.kowloon;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.ServerBaseLog;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_ck_kowloon_upgrade_building", desc = "九龙城寨-建筑升级日志", autoSave = true, uploadCk = true)
public class LogKowloonUpgradeBuilding extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "用户ID", isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "建筑id")
    private int buildingId;

    @FieldTypeAnnotation(desc = "升级前等级")
    private int beforeLevel;

    @FieldTypeAnnotation(desc = "升级后等级")
    private int afterLevel;

    @FieldTypeAnnotation(desc = "时间")
    private Date addTime;

    public LogKowloonUpgradeBuilding(long userId, int buildingId, int beforeLevel, int afterLevel) {
        this.userId = userId;
        this.buildingId = buildingId;
        this.beforeLevel = beforeLevel;
        this.afterLevel = afterLevel;
        this.addTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
